Repository navigation
Notebook: your channels (labels first, then tag per unit) (Stage 1, PR 15) - #233
Merged
Merged
Conversation
…R 15) Step A lists the labels (what was stained), prefilled only from valid, non-generic header names, with look-alike spellings grouped for the user and case collisions refused at once. Step B is an image-first grid with a thumbnail, quoted header name and a label dropdown per channel of each unit, a per-unit image type with nothing preselected, one confirm per header layout, and usage warnings for labels used in only some units. The cards are separate pieces (labels, grid, image-type column) over one answer store. Draft file version 3: null for not tagged, "" for not imaged, image_type "channels"; header names derived from the tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
… everywhere (PR 15) Owner decisions 2026-11-08: remove the not imaged / empty option, the empty-string draft state and unit_channel_empty; unused slots need a label such as unused. Colour chips now always show the ID, the shown-as name is the tooltip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
guijacquemet
marked this pull request as ready for review
November 8, 2026 14:45
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
The "Your channels" screen, after the axis roles are confirmed (pictures are read only through confirmed roles). Labels first, then tagging per unit, in the owner's words: a label names what was stained, never the dye or the microscope slot.
Ch1,C0,Channel 2,AF488,Cy5,DAPI,GFP,488 nm...; a short documented regex list inchannel_labels.GENERIC_PATTERNS). Look-alike spellings (case, space,-/_, one character) come back as a group with "Same label / Different labels / Decide later"; nothing is merged. Case collisions, duplicates,R/G/Band reserved names are refused at once with the reader's codes. Saved only on "Yes, these are the labels". The hint says that an unused slot still needs a label (for exampleunused).channel_strip: reduce, float32, own percentile contrast; Enlarge gives 1024 px), the C index, the quoted raw header name and a dropdown limited to the declared labels. Every position of every unit must get a label. One chip colour per label; a chip always shows the label ID, the shown-as name is its tooltip. A label can stand once per unit. A unit whose header names equal the labels exactly is pre-tagged, but only as a suggestion until one confirm per layout. Complete only when every position of every unit is tagged and every type answered. Labels used in k of n units say "used in k of n units: an analysis of X will be refused for the other units (A_SCOPE_INCOMPLETE)". A label sitting in different columns in different units is pointed out.LabelsCard(A),TagGrid(B) andImageTypeColumnare self-contained classes that read and save through oneAnswerStore;notebook_channels.pyis the thin layout. Rules are pure modules (channel_labels,channel_answers,channel_units).channelsmay holdnull(not tagged) or a declared channel ID; an empty string is refused.image_typemay bechannels; versions 1 and 2 are refused. Each label'sheader_namesare derived from the tagged cells at every save.missing_confirmationsaddsunit_channel_untagged. Saved tags whose length no longer fits the image are not used (never stretched);carry_overkeeps the answers of units that remain.Owner decisions (2026-11-08)
unit_channel_emptypath and the""draft state are gone (nullstill means not tagged). Every channel position of every unit needs a label the user declares in Step A (for exampleunusedorBrightfield); Step B is complete only when every position has one. The Step A hint says so. Contract section 18, CHANGELOG and tests adjusted.Tests
tests/test_notebook_channels.py(headless widget tests) andtests/test_channel_labels.py(library and draft-file tests), including: dropdown without an empty option, an unused-label slot completes Step B, one missing label keeps it incomplete, an empty-string tag is refused in the file, chip shows ID with the display name as tooltip only.origin/mainand these changes, the fullpython tools/check.pyrun: ruff check and ruff format clean,4773 passed, 4 skipped, 0 failedin 270.84 s (0:04:30), then the code rules step. The 4 skips are the existing case-sensitive file system and file-mode skips.Screenshots
Regenerated after the decisions (synthetic images; not committed):
pr15-fresh,pr15-near-miss,pr15-partial,pr15-complete,pr15-resumed. The complete state uses anunusedlabel for the third channel of the drug units.Open UX questions
🤖 Generated with Claude Code
https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm